CREATE TABLE [dbo].[Data]
(
[Ref1] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[sTypeCode] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[nValue] [decimal] (18, 0) NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Data] ADD CONSTRAINT [PK__Data__D72F3B2336B12243] PRIMARY KEY CLUSTERED  ([Ref1], [sTypeCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Data] ADD CONSTRAINT [FK__Data__nValue__38996AB5] FOREIGN KEY ([sTypeCode]) REFERENCES [dbo].[DataType] ([sTypeCode])
GO
